package org.p2psimulator.config;

import org.p2psimulator.entity.filesystem.FileDistTypes;

public class FileSystemConfig extends AbstractConfig {

	// o espaço de endereçamento define a quantidade de arquivos
	// pela seguinte relação:   total = 2^space
	private int space = -1;

	private FileDistTypes distType = null;

        private double popularSearchProb = 0.4;

        private double numberOfFiles = 5000;

	public FileSystemConfig(int idSpace, FileDistTypes distType) {
		super();
		this.space = idSpace;
		this.distType = distType;
	}

	@Override
	public boolean isComplete() {

		if (space==-1){
			return false;
		}
		if (distType==null){
			return false;
		}
		return true;
	}

	public int getIdSpace() {
		return space;
	}

	public void setIdSpace(int totalFiles) {
		this.space = totalFiles;
	}

	public double getTotalFiles(){
		return numberOfFiles;
	}
	public FileDistTypes getDistType() {
		return distType;
	}

	public void setDistType(FileDistTypes distType) {
		this.distType = distType;
	}

    public double getPopularSearchProb() {
        return popularSearchProb;
    }

    public void setPopularSearchProb(double popularSearchProb) {
        this.popularSearchProb = popularSearchProb;
    }

    public double getNumberOfFiles() {
        return numberOfFiles;
    }

    public void setNumberOfFiles(double numberOfFiles) {
        this.numberOfFiles = numberOfFiles;
    }

    public int getSpace() {
        return space;
    }

    public void setSpace(int space) {
        this.space = space;
    }
}
